cmake_minimum_required(VERSION 3.1)
project(Seek)
set(SFML_SDK "D:/SDK/SFML")
set(DB_SDK "D:/SDK/DragonBones")
set(IMGUI_SDK "D:/SDK/imgui")

if(MSVC)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
else()
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -std=c++11")
    if(NOT WIN32)
        set(GLAD_LIBRARIES dl)
    endif()
endif()

include_directories(
    ${SFML_SDK}/include
    ./include
    D:/SDK
    ${DB_SDK}/SFML/src
    ${DB_SDK}/DragonBones/src
    ${IMGUI_SDK}
    lib/imgui-sfml
    lib/seek/include
)

find_package (OpenGL REQUIRED)

add_subdirectory(${SFML_SDK} SFML.out)
add_subdirectory(${DB_SDK} DB.out)
add_subdirectory(lib/imgui-sfml)
add_subdirectory(lib/seek)

#-----------------------------build test--------------------------------------
add_subdirectory(test/imgui)
add_subdirectory(test/db)
add_subdirectory(test/seek)

#-----------------------------build Seek--------------------------------------
#aux_source_directory(./src PROJECT_SRCS)
#set(PROJECT_SRCS "./src/main.cpp")

#add_executable(${PROJECT_NAME} ${PROJECT_SRCS})
#target_link_libraries(${PROJECT_NAME}
#    ${OPENGL_LIBRARY}
#    sfml-audio
#    sfml-graphics
#    sfml-main
#    sfml-network
#    sfml-system
#    sfml-window
#    DragonBones
#)